<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <HEAD>
        <META content="IE=10.000" http-equiv="X-UA-Compatible">
        <META http-equiv="Content-Type" content="text/html; charset=utf-8">
        <META http-equiv="X-UA-Compatible" content="IE=edge">
        <LINK href="${base}/template/admin/source/set_files/bootstrap_min.css" rel="stylesheet" type="text/css" media="all">
        <LINK href="${base}/template/admin/source/set_files/style.css" rel="stylesheet" type="text/css" media="all">
        <LINK href="${base}/template/admin/source/set_files/inside.css" rel="stylesheet" type="text/css" media="all">
        <LINK href="${base}/template/admin/source/set_files/datepicker.css" rel="stylesheet" type="text/css" media="all">
        <LINK href="${base}/template/admin/source/set_files/daterangepicker.css" rel="stylesheet" type="text/css" media="all">
        <SCRIPT src="${base}/template/admin/source/set_files/jQuery.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/jquery_form_min.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/bootstrap_min.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/jquery_validate_min.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/jquery_validate_methods.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/jquery_jplayer_min.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/jquery_mb_miniPlayer.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/zeroclipboard_min.js" type="text/javascript"></SCRIPT>
        <script type="text/javascript" src="${base}/template/common/js/include.js"></script>
        <TITLE>
        </TITLE>
        <META name="GENERATOR" content="MSHTML 10.00.9200.16578">
    </HEAD>
    <style>
    	.hidden{display:none;}
    </style>
    <BODY>
        <DIV id="main">
            <DIV class="container-fluid">
                <DIV class="row-fluid">
                    <DIV class="span12">
                        <DIV class="box">
                            <DIV class="box-title">
                                <DIV class="span12">
                                    <H3>
										管理员设置
                                    </H3>
                                </DIV>
                            </DIV>
                            <DIV class="box-content">
                                <FORM class="form-horizontal form-validate" action="<#if isAddAction>admin!save.shtml<#else>admin!update.shtml</#if>"
                                method="post">
                                    <DIV class="control-group">
                                        <LABEL class="control-label" for="title">
											 用户名：
                                        </LABEL>
                                        <DIV class="controls">
                                            <INPUT name="admin.username" class="input-xlarge" id="username" type="text" value="${(admin.username)!}" 
                                            <#if isAddAction>
                                            data-rule-required="true"
                                            data-rule-remote="admin!checkUsername.shtml"
                                            data-msg-remote="用户名已存在"
                                            <#else>readonly</#if>  data-rule-maxlength=32>
                                        </DIV>
                                    </DIV>
                                    <DIV class="control-group">
                                        <LABEL class="control-label" for="title">
											 登陆密码：
                                        </LABEL>
                                        <DIV class="controls">
                                            <INPUT name="admin.password" class="input-xlarge" id="password" type="password" value=""
                                            <#if isAddAction>
                                            data-rule-required="true"
                                            data-rule-rangelength="[8,20]"
                                            data-msg-rangelength="密码长度必须在 8 ~ 20 之间" 
                                            </#if>/>
                                        </DIV>
                                    </DIV>
                                    <DIV class="control-group">
                                        <LABEL class="control-label" for="title">
											邮箱：
                                        </LABEL>
                                        <DIV class="controls">
                                        	<INPUT name="admin.email" class="input-xlarge" id="email" type="text" value="${(admin.email)!}"
                                        	data-rule-required="true" data-rule-email="true" data-rule-maxlength=32>
                                        </DIV>
                                    </DIV>
                                    <DIV class="control-group">
                                        <LABEL class="control-label" for="title">
											姓名：
                                        </LABEL>
                                        <DIV class="controls">
                                        	<INPUT name="admin.name" class="input-xlarge" id="name" data-rule-maxlength=32 type="text" value="${(admin.name)!}">
                                        </DIV>
                                    </DIV>
                                    <DIV class="control-group">
                                        <LABEL class="control-label" for="brief">
											角色：
                                        </LABEL>
                                        <DIV class="controls">
                                        	<#assign roleSet = (admin.roleSet)! />
											<#list allRoleList as role>
												<input type="checkbox" name="roleList.id" data-rule-required="true" data-msg-required="请选择角色" value="${role.id}"<#list roleSet as role_><#if role_ == role> checked</#if></#list> /> ${role.name}
											</#list>
                                        </DIV>
                                    </DIV>
                                    <INPUT name="id" type="hidden" value="${id}">
                                    <DIV class="form-actions">
                                        <BUTTON class="btn btn-primary" id="bsubmit" type="submit" data-loading-text="提交中...">
											保存
                                        </BUTTON>
                                        <BUTTON class="btn btn-primary" onclick="window.history.back(); return false;" type="button" data-loading-text="返回中...">
											返回
                                        </BUTTON>
                                    </DIV>
                                </FORM>
                            </DIV>
                        </DIV>
                    </DIV>
                </DIV>
            </DIV>
        </DIV>
    </BODY>
</HTML>